#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include <QMessageBox>
#include <QJsonDocument>
#include <QJsonObject>
#include <QInputDialog>
#include <QNetworkAccessManager>
#include <QNetworkReply>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent, const QString& ip, const QString& port);
    ~MainWindow();


private slots:
    void handleBalance();
    void handleTransfer();
    void handleDeposit();
    void handleWithdraw();
    void handleNetworkReply(QNetworkReply* reply);

private:
    void sendRequest(const QString &url, const QJsonObject &json);

private:
    Ui::MainWindow *ui;

    QNetworkAccessManager *networkManager;
    QString sip;
    QString sport;

};
#endif // MAINWINDOW_H
